﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class PDFDisplay : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!(Session["RakazID"] == null))
        {
            int RakazID = (int)Session["RakazID"];
        }
        else
        {
            Response.Redirect("Login.aspx");
        }
        HSH.HSHDataService m_data = new HSH.HSHDataService();
        byte[] PDFBA = new byte[0];
        int RakazEventID = Convert.ToInt32(Request.QueryString["RakazEventID"]);
        PDFBA = m_data.GetPDF(RakazEventID);
        Response.ContentType = "Application/pdf";
        Response.BinaryWrite(PDFBA);
        Response.End();
    }
}